package com.car.sale.controller;

import com.car.sale.service.NewsService;
import com.car.sale.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/News")
public class NewsController {
    @Autowired
    private NewsService newsService;
    @ResponseBody
    @GetMapping("/get")
    public Result getNews()
    {
        return newsService.getTodayNews();
    }
}
